﻿using Husb.DataUtil;
using System.Data;
namespace CentralOffice.Archive.Data {
    
    
    public partial class ArchiveDataSet {
        partial class ArchivesDataTable
        {
        }
    
        public partial class ArchivesRow
        {
            #region GenerateFilterExpression
            public string FilterExpression
            {
                get
                {
                    string where = "";

                    //where += DataAccessUtil.GetPartWhereCondition("Id", this);
                    where += DataAccessUtil.GetPartWhereCondition("Name", this);
                    //where += DataAccessUtil.GetPartWhereCondition("QueryNumber", this);
                    where += DataAccessUtil.GetPartWhereCondition("SecretLevel", this, true);
                    
                    where += DataAccessUtil.GetPartWhereCondition("Province", this);
                    where += DataAccessUtil.GetPartWhereCondition("City", this);
                    where += DataAccessUtil.GetPartWhereCondition("County", this);
                    where += DataAccessUtil.GetPartWhereCondition("ContractCode", this);
                    //where += DataAccessUtil.GetPartWhereCondition("FiledDate", this);
                    where += DataAccessUtil.GetPartWhereCondition("FiledDate", "FiledDateEnd", this);
                    //where += DataAccessUtil.GetPartWhereCondition("CustomerId", this);
                    where += DataAccessUtil.GetPartWhereCondition("Customer", this);

                    where += DataAccessUtil.GetPartWhereCondition("Address", this);
                    where += DataAccessUtil.GetPartWhereCondition("Contact", this);
                    where += DataAccessUtil.GetPartWhereCondition("Telephone1", this);

                    where += DataAccessUtil.GetPartWhereCondition("CategoryId", this, DbType.Guid);
                    where += DataAccessUtil.GetPartWhereCondition("Category", this, true);
                    where += DataAccessUtil.GetPartWhereCondition("Scale", this, DbType.Int32);
                    where += DataAccessUtil.GetPartWhereCondition("ConstructForm", this);
                    where += DataAccessUtil.GetPartWhereCondition("DesignStage", this);
                    where += DataAccessUtil.GetPartWhereCondition("BelongedTo", this);
                    where += DataAccessUtil.GetPartWhereCondition("ProjectManager", this);
                    where += DataAccessUtil.GetPartWhereCondition("BuildingBlueprint", this);
                    where += DataAccessUtil.GetPartWhereCondition("ElectricalBlueprint", this);
                    where += DataAccessUtil.GetPartWhereCondition("MechanicalMaterialManifest", this);
                    where += DataAccessUtil.GetPartWhereCondition("ElectricalMaterialManifest", this);
                    where += DataAccessUtil.GetPartWhereCondition("SystemSolution", this);
                    where += DataAccessUtil.GetPartWhereCondition("ElectricalSolution", this);

                    where += DataAccessUtil.GetPartWhereCondition("DesignSketch", this);
                    where += DataAccessUtil.GetPartWhereCondition("TenderDocumentation", this);
                    where += DataAccessUtil.GetPartWhereCondition("PreliminaryDesign", this);
                    where += DataAccessUtil.GetPartWhereCondition("OtherDocumentation", this);
                    where += DataAccessUtil.GetPartWhereCondition("KeyWords", this);
                    where += DataAccessUtil.GetPartWhereCondition("DesignedYear", this);

                    //where += DataAccessUtil.GetPartWhereCondition("IsDeleted", this);
                    //where += DataAccessUtil.GetPartWhereCondition("IsActive", this);
                    //where += DataAccessUtil.GetPartWhereCondition("CreatedTime", this);
                    //where += DataAccessUtil.GetPartWhereCondition("CreatedBy", this);
                    //where += DataAccessUtil.GetPartWhereCondition("ModifiedTime", this);
                    //where += DataAccessUtil.GetPartWhereCondition("LastModifiedBy", this);
                    //where += DataAccessUtil.GetPartWhereCondition("Version", this);
                    //where += DataAccessUtil.GetPartWhereCondition("Description", this);

                    return where;
                }
            }

            #endregion
        }
    }
}
